﻿<%@ Page Language="C#" MasterPageFile="~/MainMaster.Master" AutoEventWireup="true"
    CodeBehind="KtCommBaseInfo.aspx.cs" Inherits="Mang24k99.Web.COMM.KtCommBaseInfo"
    Title="系统运行参数维护" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server" >

    <script type="text/javascript">
        function Cancel()
        {
            var result =confirm("刚才未保存的操作将会取消，你确定吗？");
            if(result)
            {
                return true;
            }
            else
            {
                return false;
            }
        }

    </script>

    <div>
        <asp:Panel ID="Panel1" runat="server">
            <asp:Button ID="btnBack" CssClass="form_btn" runat="server" Text="返回上一页" OnClick="btnBack_Click" />
            <table >
                <tr>
                    <td class="tb_title1">
                        编&nbsp;&nbsp;&nbsp;码：
                    </td>
                    <td class="tb_txt1">
                        <asp:TextBox ID="txtCode" runat="server"></asp:TextBox>
                    </td>
                    <td class="tb_title1">
                        名&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;称：
                    </td>
                    <td class="tb_txt1">
                        <asp:TextBox ID="txtName" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="tb_title1">
                        参数值：
                    </td>
                    <td class="tb_txt1">
                        <asp:TextBox ID="txtValue" runat="server"></asp:TextBox>
                    </td>
                    <td class="tb_title1">
                        是否有效：
                    </td>
                    <td class="tb_txt1">
                        <asp:DropDownList ID="ddlIsValidate" runat="server">
                            <asp:ListItem Selected="True" Value="1">使用</asp:ListItem>
                            <asp:ListItem Value="0">禁用</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="tb_title1" valign="top">
                        备&nbsp;&nbsp;&nbsp;注：
                    </td>
                    <td class="tb_txt1">
                        <asp:TextBox ID="txtRemark" runat="server" Height="103px" TextMode="MultiLine" Width="191px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td colspan="2" align="center">
                        <asp:Button CssClass="form_btn" ID="btnSave" runat="server" Text="保存" OnClick="btnSave_Click" />
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:Button CssClass="form_btn" ID="btnCancel" runat="server" Text="取消" OnClick="btnCancel_Click" />
                    </td>
                </tr>
            </table>
        </asp:Panel>
        <asp:Panel ID="Panel2" runat="server">
            <div>
                <asp:Button ID="btnAdd" CssClass="form_btn" runat="server" Text="新增"  OnClick="btnAdd_Click" />
            </div>
            <div>
                <asp:GridView ID="grdList" Width="100%" runat="server" OnSelectedIndexChanged="grdList_SelectedIndexChanged"
                    OnRowDeleting="grdList_RowDeleting" AutoGenerateColumns="False">
                    <HeaderStyle CssClass="tb_title2" />
                    <RowStyle CssClass="tb_txt2" />
                    <Columns>
                        <asp:TemplateField HeaderText="序号">
                            <ItemTemplate>
                                <%#Container.DataItemIndex+1%>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="ID" HeaderText="ID" />
                        <asp:BoundField DataField="FACTOR_CODE" HeaderText="参数代码" />
                        <asp:BoundField DataField="FACTOR_NAME" HeaderText="参数名称" />
                        <asp:BoundField DataField="FACTOR_VALUE" HeaderText="参数值" />
                        <asp:TemplateField HeaderText="是否有效">
                            <ItemTemplate>
                                <asp:Label ID="lab" runat="server" Text='<%#GetStatus((int)Eval("IS_VALIDATE"))%>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="COMMENTS" HeaderText="备注" />
                        <asp:ButtonField ButtonType="link" CommandName="Select" HeaderText="编辑" ShowHeader="True"
                            Text="编辑" />
                        <asp:CommandField DeleteText="&lt;div id=&quot;de&quot; onclick=&quot;JavaScript:return confirm('确定删除吗？')&quot;&gt;删除&lt;/div&gt; "  HeaderText="删除"
                            ShowDeleteButton="True" />
                    </Columns>
                </asp:GridView>
            </div>
            <div>
                <webdiyer:AspNetPager ID="AspNetPager1" runat="server" PageSize="8" FirstPageText="首页"
                    LastPageText="尾页" NextPageText="下一页" OnPageChanged="AspNetPager1_PageChanged"
                    PrevPageText="上一页" ShowInputBox="Always" SubmitButtonText="GO" AlwaysShow="True"
                    CssClass="AspNetPager" CustomInfoHTML="  共&lt;span class=&quot;AspNetPager_current&quot;&gt;{0}&lt;/span&gt;页"
                    CurrentPageButtonClass="AspNetPager_current" CustomInfoClass="" HorizontalAlign="Right"
                    InputBoxClass="AspNetPager_txt" SubmitButtonClass="AspNetPager_btn" CurrentPageButtonStyle="AspNetPager"
                    PagingButtonSpacing="1px" ShowCustomInfoSection="Right">
                </webdiyer:AspNetPager>
            </div>
        </asp:Panel>
    </div>
</asp:Content>
